package com.slz3.business.module.configManagement.conIndexShowImg.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.configManagement.conIndexShowImg.domain.ConIndexShowImg;
import com.slz3.business.module.configManagement.conIndexShowImg.domain.ConIndexShowImgCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class ConIndexShowImgResController {

    static Mono<ServerResponse> add(ServerRequest req, ConIndexShowImg conIndexShowImg) {
        if (ConIndexShowImgResUnsafeValid.add(req, conIndexShowImg)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConIndexShowImgResAtomic.add_$ConIndexShowImgUpdateLock(req, conIndexShowImg);
        }
    }

    static final Mono<ServerResponse> delete(ServerRequest req, ConIndexShowImgCondition conIndexShowImgCondition) {
        if (ConIndexShowImgResUnsafeValid.delete(req, conIndexShowImgCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConIndexShowImgResAtomic.delete_$ConIndexShowImgUpdateLock(req, conIndexShowImgCondition);
        }
    }

    static Mono<ServerResponse> modify(ServerRequest req, ConIndexShowImg conIndexShowImg) {
        if (ConIndexShowImgResUnsafeValid.modify(req, conIndexShowImg)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConIndexShowImgResAtomic.modify_$ConIndexShowImgUpdateLock(req, conIndexShowImg);
        }
    }

    static Mono<ServerResponse> list(ServerRequest req) {
        if (ConIndexShowImgResUnsafeValid.list(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConIndexShowImgResExecutor.list(req);
        }
    }

    static Mono<ServerResponse> info(ServerRequest req) {
        if (ConIndexShowImgResUnsafeValid.info(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConIndexShowImgResAtomic.info_$ConIndexShowImgUpdateLock(req);
        }
    }

    static Mono<ServerResponse> choice(ServerRequest req) {
        if (ConIndexShowImgResUnsafeValid.choice(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConIndexShowImgResExecutor.choice(req);
        }
    }

    static final Mono<ServerResponse> auditSubmit(ServerRequest req, ConIndexShowImgCondition conIndexShowImgCondition) {
        //
        if (ConIndexShowImgResUnsafeValid.auditSubmit(req, conIndexShowImgCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConIndexShowImgResAtomic.auditSubmit_$ConIndexShowImgUpdateLock(req, conIndexShowImgCondition);
        }
    }

    static final Mono<ServerResponse> audit(ServerRequest req, ConIndexShowImgCondition conIndexShowImgCondition) {
        if (ConIndexShowImgResUnsafeValid.audit(req, conIndexShowImgCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConIndexShowImgResAtomic.audit_$ConIndexShowImgUpdateLock(req, conIndexShowImgCondition);
        }
    }

    static final Mono<ServerResponse> auditReject(ServerRequest req, ConIndexShowImgCondition conIndexShowImgCondition) {
        if (ConIndexShowImgResUnsafeValid.auditReject(req, conIndexShowImgCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConIndexShowImgResAtomic.auditReject_$ConIndexShowImgUpdateLock(req, conIndexShowImgCondition);
        }
    }

    static final Mono<ServerResponse> usingEnable(ServerRequest req, ConIndexShowImgCondition conIndexShowImgCondition) {
        if (ConIndexShowImgResUnsafeValid.usingEnable(req, conIndexShowImgCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConIndexShowImgResAtomic.usingEnable_$ConIndexShowImgUpdateLock(req, conIndexShowImgCondition);
        }
    }

    static final Mono<ServerResponse> usingDisable(ServerRequest req, ConIndexShowImgCondition conIndexShowImgCondition) {
        if (ConIndexShowImgResUnsafeValid.usingDisable(req, conIndexShowImgCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConIndexShowImgResAtomic.usingDisable_$ConIndexShowImgUpdateLock(req, conIndexShowImgCondition);
        }
    }

}
